from flask import Blueprint, session, request, render_template

l = Blueprint("login", __name__)

@l.route("/login")
def login():
    print("登陆中...")
    session["is_login"] = True
    return "登陆成功"

@l.route("/login/update")
def update_user():
    return "修改用户信息成功"

@l.route("/reg")
def reg():
    # raise Exception("出错了")
    return "注册用户成功"

# @l.route("/test.png")
# def png():
#     return "png"

@l.route("/login/index")
def index():
    session["username"] = "张小青"
    article = {
        "title": "学习Python的心得体会",
        "count": 2000
    }
    return render_template("index.html", article = article)



